package online.exam.controller;

import cn.hutool.core.util.IdUtil;
import online.exam.utils.MD5Tools;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 用于页面跳转的相关接口
 *
 * @author 王景煜
 */

@Controller
public class UrlController {

    @GetMapping(value = "/")
    public String toIndex() {
        System.out.println(IdUtil.simpleUUID());
        System.out.println(MD5Tools.md5EncodingUtf8("123456"));
        System.out.println(MD5Tools.md5EncodingUtf8("admin"));
        return "redirect:/index";
    }

    @GetMapping(value = "/index")
    public String index() {
        return "student";
    }

    @GetMapping(value = "/teacher")
    public String toTea() {
        return "teacher";
    }
}
